package com.company.cloud.mall.modules.app.controller.resp;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class CartModel {

    @ApiModelProperty(value = "公司编号")
    private String companyNo;
    
    @ApiModelProperty(value = "公司名称")
    private String companyName;
	
	@ApiModelProperty(value = "购物车商品")
	private List<CartItemModel> items;
	
	public void addItem(CartItemModel item) {
		if(this.items==null) {
			this.items=new ArrayList<CartItemModel>();
		}
		if(item!=null) {
			this.items.add(item);
		}
	}
	
}